package com.itheima.day15.work1;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class InetAddressDemo1 {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress byName = InetAddress.getByName("DESKTOP-V9HPKHL");
        String hostAddress = byName.getHostAddress();
        String hostName = byName.getHostName();
        System.out.println(byName);
        System.out.println(hostName);
        System.out.println(hostAddress);
    }
}
